package test3;

import java.util.Calendar;


public class demo4 {
	public static void main(String[] args) {
		Calendar calendar = Calendar.getInstance();
		System.out.println(calendar.getTime().toLocaleString());
		System.out.println(calendar.getTimeInMillis());

		int year = calendar.get(calendar.YEAR);

		int month = calendar.get(calendar.MONTH);

		int day = calendar.get(calendar.DAY_OF_MONTH);

		int hour = calendar.get(calendar.HOUR_OF_DAY);

		int minute = calendar.get(calendar.MINUTE);
		int secord = calendar.get(calendar.SECOND);

		System.out.println(year+"年"+(month+1)+"月"+day+"日"+hour+":"+minute+":"+secord);
	
		
	}
}
